package shouji;

/*
2.1 第一步：设计和实现以下类

    （1）手机卡类 特征：卡类型、卡号、用户名、密码、账户余额、通话时长(分钟)、上网流量 行为：显示（卡号 + 用户名 + 当前余额）

    （2）通话套餐类 特征：通话时长、短信条数、每月资费 行为: 显示所有套餐信息     （3）上网套餐类 特征：上网流量、每月资费 行为：显示所有套餐信息

    （4）用户消费信息类 特征：统计通话时长、统计上网流量、每月消费金额
 */
public class PhoneCard {
    //卡类型
    private Enum<CardType> phoneCardType;

    public Enum<CardType> getPhoneCardType() {
        return phoneCardType;
    }

    public void setPhoneCardType(Enum<CardType> phoneCardType) {
        this.phoneCardType = phoneCardType;
    }

    //卡号
    private int cardNumber;
    //用户名
    private String userName;
    //密码
    private String password;
    //账户余额
    private double accountBalance;
    //通话时长
    private int talkTime;
    //上网流量
    private double netFlow;

    PhoneCard(){ }

    PhoneCard(int cardNumber,String userName,String password,double accountBalance,int talkTime,double netFlow,Enum<CardType> phoneCardType){
        this.cardNumber = cardNumber;
        this.password = password;
        this.accountBalance = accountBalance;
        this.talkTime = talkTime;
        this.netFlow = netFlow;
        this.phoneCardType = phoneCardType;
    }

    public void show(){
        System.out.println("当前卡号:"+this.cardNumber+",用户名："+this.userName+"，当前余额："+this.accountBalance);
    }

    public int getCardNumber() {
        return cardNumber;
    }
    public void setCardNumber(int cardNumber) {
        this.cardNumber = cardNumber;
    }
    public String getUserName() {
        return userName;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public double getAccountBalance() {
        return accountBalance;
    }
    public void setAccountBalance(double accountBalance) {
        this.accountBalance = accountBalance;
    }
    public int getTalkTime() {
        return talkTime;
    }
    public void setTalkTime(int talkTime) {
        this.talkTime = talkTime;
    }
    public double getNetFlow() {
        return netFlow;
    }
    public void setNetFlow(double netFlow) {
        this.netFlow = netFlow;
    }
}
